package apps;

import spread.AdvancedMessageListener;
import spread.SpreadMessage;


public class ListenerThread implements AdvancedMessageListener{
	private AccountClient account;

    public ListenerThread(AccountClient account) {
        this.account = account;
    }
    
    @Override
    public void membershipMessageReceived(SpreadMessage message) {
        account.receiveAndProcessMembershipMessages(message);
    }

    @Override
    public void regularMessageReceived(SpreadMessage message) {
        
        account.processMessageReceived(message);
    }

	
	
}
